Ext.define('Jee.view.Main',{
      extend : 'Ext.tab.Panel',
      alias : 'widget.main',
      id:"main",
      title : '',
      items: [{
            title: '主页',
            iconCls: 'tabs',
            html: '',
            closable: false
        }],
      initComponent : function(){
      	this.callParent();
      },
      openTab:function(panel,id){
    	  var o = (typeof panel =='string' ? panel:id || panel.id);
    	  var tab = this.getComponent(o);
    	  if(tab){
    		  this.setActiveTab(tab);
    	  }else if(typeof panel != 'string'){
    		  panel.id = o;
    		  var p = this.add(panel);
    		  this.setActiveTab(p);
    	  }
      },
      containsTab:function(id){
    	   var tab = this.getComponent(id);
    	   return tab;
      }
});